]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
gcc/
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
0ae9bd27
MP
12015-06-25 Marek Polacek <polacek@redhat.com>
2
3 * c-array-notation.c: Use VAR_P throughout.
4 * c-decl.c: Likewise.
5 * c-objc-common.c: Likewise.
6 * c-parser.c: Likewise.
7 * c-typeck.c: Likewise.
8
62f9079a
MP
92015-06-25 Marek Polacek <polacek@redhat.com>
10
11 * c-decl.c: Use is_global_var throughout.
12 * c-parser.c: Likewise.
13 * c-typeck.c: Likewise.
14
abb226c9
AM
152015-06-17 Andrew MacLeod <amacleod@redhat.com>
16
17 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
18 * c-aux-info.c: Likewise.
19 * c-convert.c: Likewise.
20 * c-decl.c: Likewise.
21 * c-errors.c: Likewise.
22 * c-lang.c: Likewise.
23 * c-objc-common.c: Likewise.
24 * c-parser.c: Likewise.
25 * c-typeck.c: Likewise.
26
8cbababc
JH
272015-06-11 Jan Hubicka <hubicka@ucw.cz>
28
29 PR middle-end/66325
30 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
31 variants.
32
a0349665
PMR
332015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
34
35 * c-decl.c (pop_scope): Register the main translation unit
36 through the new debug hook.
37
13fdf2e2
AM
382015-06-08 Andrew MacLeod <amacleod@redhat.com>
39
40 * c-array-notation.c : Adjust include files.
41 * c-aux-info.c : Likewise.
42 * c-convert.c : Likewise.
43 * c-decl.c : Likewise.
44 * c-errors.c : Likewise.
45 * c-lang.c : Likewise.
46 * c-lang.h : Likewise.
47 * c-objc-common.c : Likewise.
48 * c-parser.c : Likewise.
49 * c-typeck.c : Likewise.
50
d7438551
AH
512015-06-05 Aldy Hernandez <aldyh@redhat.com>
52
53 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
54 immediately clobber it.
55 (c_write_global_declarations_1): Remove call to
56 check_global_declaration_1.
57 (c_write_global_declarations_2): Remove.
58 (c_write_final_cleanups): Rename from c_write_global_declarations.
59 Remove call to finalize_compilation_unit.
60 Remove calls to debugging hooks.
61 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
62 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
63 * c-tree.h: Remove c_write_global_declarations.
64
ecb9f223
AM
652015-06-04 Andrew MacLeod <amacleod@redhat.com>
66
67 * c-array-notation.c: Adjust includes for restructured coretypes.h.
68 * c-aux-info.c: Likewise.
69 * c-convert.c: Likewise.
70 * c-decl.c: Likewise.
71 * c-errors.c: Likewise.
72 * c-lang.c: Likewise.
73 * c-objc-common.c: Likewise.
74 * c-parser.c: Likewise.
75 * c-typeck.c: Likewise.
76
9482b620
MP
772015-06-04 Marek Polacek <polacek@redhat.com>
78
79 PR c/66341
80 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
81 it is a lvalue.
82
bc51ace3
PK
832015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
84
85 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
86 Warn for empty struct.
87 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
88
ea5b45b6
AT
892015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
90
91 * c-decl.c (start_function): Call plugin before parsing.
92 (finish_function): Call plugin after parsing.
93
c2d47482
PK
942015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
95
96 PR c/49551
97 * c-decl.c (merge_decls): Merge DECL_COMMON.
98
a95492ab
JW
992015-05-22 Jim Wilson <jim.wilson@linaro.org>
100
101 * Make-lang.in (check_gcc_pallelize): Define.
102
fd5c817a
MP
1032015-05-22 Marek Polacek <polacek@redhat.com>
104
105 PR c/47043
106 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
107 attributes.
108
c7b70a3c
MP
1092015-05-21 Marek Polacek <polacek@redhat.com>
110
111 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
112 DECL_BUILT_IN.
113
21b634ae
MP
1142015-05-20 Marek Polacek <polacek@redhat.com>
115
116 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
117 * c-typeck.c: Likewise.
118
296a8c2f
MP
1192015-05-19 Marek Polacek <polacek@redhat.com>
120
121 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
122
41b37d5e
JJ
1232015-05-19 Jakub Jelinek <jakub@redhat.com>
124
125 PR middle-end/66199
126 * c-parser.c (c_parser_omp_for_loop): Don't add
127 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
128 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
129 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
130 constructs.
131
fab27f52
MM
1322015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
133
134 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 135 swaps.
fab27f52 136
40de31cf
MLI
1372015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
138
139 PR fortran/44054
140 * c-objc-common.c (c_tree_printer): Replace locus pointer with
141 accessor function.
142
3aa3c9fc
MP
1432015-05-14 Marek Polacek <polacek@redhat.com>
144
145 PR c/66066
146 PR c/66127
147 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
148 rather than with 0.
149
c3388e62
DM
1502015-05-12 David Malcolm <dmalcolm@redhat.com>
151
152 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
153 to add a call to warn_for_misleading_indentation.
154 (c_parser_else_body): Likewise, adding param "else_loc".
155 (c_parser_if_statement): Check for misleading indentation.
156 (c_parser_while_statement): Likewise.
157 (c_parser_for_statement): Likewise.
158
755e528f
MP
1592015-05-08 Marek Polacek <polacek@redhat.com>
160
161 PR c/64918
162 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
163 (output_init_element): Likewise.
164
0173bd2a
MP
1652015-05-07 Marek Polacek <polacek@redhat.com>
166
167 PR c/65179
168 * c-typeck.c (build_binary_op): Warn when left shifting a negative
169 value.
170
9babc352
MP
1712015-04-30 Marek Polacek <polacek@redhat.com>
172
173 * c-typeck.c (set_init_label): Call error_at instead of error and
174 pass LOC to it.
175
ac9f18db
MP
176 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
177 the type of a decl.
178
ec3fba51
MP
179 * c-typeck.c (c_build_va_arg): Clarify the error message.
180
b811915d
TS
1812015-04-29 Thomas Schwinge <thomas@codesourcery.com>
182
183 * c-parser.c (c_parser_oacc_enter_exit_data): Use
184 OMP_STANDALONE_CLAUSES.
185
f3075008
MP
1862015-04-28 Marek Polacek <polacek@redhat.com>
187
188 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
189
4e81b788
MP
1902015-04-28 Marek Polacek <polacek@redhat.com>
191
192 PR c/65901
193 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
194
6c1db78e
MP
1952015-04-25 Marek Polacek <polacek@redhat.com>
196
197 PR c/52085
198 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
199 attribute.
200
5c4abbb8
MP
2012015-04-23 Marek Polacek <polacek@redhat.com>
202
203 PR c/65345
204 * c-decl.c (set_labels_context_r): New function.
205 (store_parm_decls): Call it via walk_tree_without_duplicates.
206 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
207 instead of create_tmp_var. Build TARGET_EXPR instead of
208 COMPOUND_EXPR.
209 (build_atomic_assign): Use create_tmp_var_raw instead of
210 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
211
06aca1d5
IV
2122015-04-20 Ilya Verbin <ilya.verbin@intel.com>
213
214 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
215 (c_parser_omp_target_update): Add missed %> to error_at ().
216
8fba1830
BRF
2172015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
218
219 PR target/55143
220 * c-decl.c (c_default_pointer_mode): Remove definition.
221 * c-tree.h (c_default_pointer_mode): Remove declaration.
222
62021f64
TB
2232015-03-27 Tobias Burnus <burnus@net-b.de>
224
225 PR c/65586
226 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
227 error out.
228 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
229 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
230 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
231
9b65e171
JJ
2322015-03-19 Jakub Jelinek <jakub@redhat.com>
233
234 * c-decl.c (c_decl_attributes): Also add "omp declare target"
235 attribute for DECL_EXTERNAL VAR_DECLs.
236
17958621
JJ
2372015-03-11 Jakub Jelinek <jakub@redhat.com>
238
239 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
240 argument.
241
7ccb1a11
JJ
2422015-03-10 Jakub Jelinek <jakub@redhat.com>
243
244 PR c/65120
245 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
246 before preparing arguments to warn_logical_not_parentheses.
247
01177669
JJ
2482015-03-09 Jakub Jelinek <jakub@redhat.com>
249
250 PR c/65120
251 * c-typeck.c (parser_build_binary_op): Don't warn for
252 !!x == y or !b == y where b is _Bool.
253
802ac282
MP
2542015-03-09 Marek Polacek <polacek@redhat.com>
255
256 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
257 * c-decl.c (grokdeclarator): Likewise.
258 * c-typeck.c (build_binary_op): Likewise.
259
e5165b60
MP
2602015-02-27 Marek Polacek <polacek@redhat.com>
261
262 PR c/65228
263 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
264
065d214c
MP
2652015-02-14 Marek Polacek <polacek@redhat.com>
266
267 PR c/64768
268 * c-decl.c (grokdeclarator): Set the range of a flexible array member
269 declared through a typedef name.
270
e5d9235b
MP
2712015-02-13 Marek Polacek <polacek@redhat.com>
272
273 PR c/65050
274 * c-decl.c (grokdeclarator): Print also the type when giving
275 the error message about array's incomplete element type.
276
fa01ffcc
JJ
2772015-02-11 Jakub Jelinek <jakub@redhat.com>
278
279 PR c/64824
280 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
281 check in the POP macro.
282
c3e38a03
MP
2832015-02-09 Marek Polacek <polacek@redhat.com>
284
285 PR c/64856
286 * c-typeck.c (process_init_element): Don't always wrap
287 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
288 initializing a range of elements.
289
4886ec8e
JJ
2902015-02-04 Jakub Jelinek <jakub@redhat.com>
291
292 PR c/64824
293 PR c/64868
294 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
295
c3e38a03 2962015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
297
298 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
299 processing enum declaration.
300
7b33f0c8
MP
3012015-01-29 Marek Polacek <polacek@redhat.com>
302
303 PR c/64709
304 * c-typeck.c (pop_init_level): If constructor_elements has
305 exactly one element with integer_zerop value, set constructor_zeroinit
306 to 1. Remove braces around warning_init call.
307
dea63e49
JJ
3082015-01-27 Jakub Jelinek <jakub@redhat.com>
309
310 PR c/64766
311 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
312 of FUNCTION_DECLs with error_mark_node.
313
d38f7dce
JJ
3142015-01-26 Jakub Jelinek <jakub@redhat.com>
315
316 PR c/64778
317 * c-typeck.c (convert_arguments): Return -1 if there are
318 error_args, even if we've diagnosed too many arguments.
319
cbf5d0e7
RB
3202015-01-21 Richard Biener <rguenther@suse.de>
321
322 PR middle-end/64313
323 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
324 for builtins the user declared correctly.
325
41dbbb37
TS
3262015-01-15 Thomas Schwinge <thomas@codesourcery.com>
327 Bernd Schmidt <bernds@codesourcery.com>
328 Cesar Philippidis <cesar@codesourcery.com>
329 James Norris <jnorris@codesourcery.com>
330 Jakub Jelinek <jakub@redhat.com>
331 Ilmir Usmanov <i.usmanov@samsung.com>
332
333 * c-parser.c: Include "gomp-constants.h".
334 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
335 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
336 Use OMP_CLAUSE_SET_MAP_KIND.
337 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
338 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
339 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
340 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
341 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
342 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
343 "copyout", "create", "delete", "deviceptr", "gang", "host",
344 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
345 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
346 "present_or_create", "pcreate", "seq", "self", "vector",
347 "vector_length", "wait", "worker".
348 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
349 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
350 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
351 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
352 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
353 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
354 (c_parser_oacc_data_clause_deviceptr)
355 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
356 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
357 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
358 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
359 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
360 (c_parser_oacc_parallel, c_parser_oacc_update)
361 (c_parser_oacc_wait): New functions.
362 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
363 (c_finish_oacc_data): New prototypes.
364 * c-typeck.c: Include "gomp-constants.h".
365 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
366 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
367 OMP_CLAUSE_SET_MAP_KIND.
368 (c_finish_oacc_parallel, c_finish_oacc_kernels)
369 (c_finish_oacc_data): New functions.
370 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
371 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
372 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
373 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
374 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
375 GOMP_MAP_FORCE_DEVICEPTR.
376
adfac8df
JJ
3772015-01-09 Michael Collison <michael.collison@linaro.org>
378
379 * c-array-notation.c: Include hash-set.h, machmode.h,
380 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
381 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
382 * c-aux-info.c: Ditto.
383 * c-convert.c: Ditto.
384 * c-decl.c: Ditto.
385 * c-errors.c: Ditto.
386 * c-lang.c: Dittoxs.
387 * c-objc-common.c: Ditto.
388 * c-parser.c: Ditto.
389 * c-typeck.c: Include hash-set.h, machmode.h,
390 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
391 fold-const.h, wide-int.h, inchash.h, real.h and
392 fixed-value.h due to flattening of tree.h.
393
2cc901dc
MP
3942015-01-07 Marek Polacek <polacek@redhat.com>
395
396 PR c/64417
397 * c-typeck.c (process_init_element): Disallow initialization of
398 a flexible array member with a string constant if the structure
399 is in an array.
400
5624e564
JJ
4012015-01-05 Jakub Jelinek <jakub@redhat.com>
402
e5341100
JJ
403 PR sanitizer/64344
404 * c-typeck.c (convert_for_assignment, c_finish_return): For
405 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
406 types also set in_late_binary_op around convert call.
407 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
408 to integral type casts, if not in_late_binary_op, pass c_fully_fold
409 result on expr as last argument to ubsan_instrument_float_cast,
410 if in_late_binary_op, don't use c_save_expr but save_expr.
411
5624e564
JJ
412 Update copyright years.
413
5bd012f8
MP
4142015-01-05 Marek Polacek <polacek@redhat.com>
415
416 PR c/64423
417 * c-typeck.c (build_array_ref): Pass loc down to
418 warn_array_subscript_with_type_char.
419
768952be
MU
4202014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
421
422 * c-typeck.c: New behavious for pointers to arrays with qualifiers
423 (common-pointer-type): For pointers to arrays take qualifiers from
424 element type.
425 (build_conditional_expr): Add warnings for lost qualifiers.
426 (comp-target-types): Allow pointers to arrays with different qualifiers.
427 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
428 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
429 to PEDWARN_FOR_QUALIFIERS.
430
8f94a8c4
JJ
4312014-12-17 Jakub Jelinek <jakub@redhat.com>
432
433 PR sanitizer/64289
434 * c-convert.c: Include ubsan.h.
435 (convert): For real -> integral casts and
436 -fsanitize=float-cast-overflow don't call convert_to_integer, but
437 instead instrument the float cast directly.
438
b731b390
JJ
4392014-11-29 Jakub Jelinek <jakub@redhat.com>
440
441 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
442 c_finish_stmt_expr): Remove NULL last argument from
443 create_tmp_var_raw and create_tmp_var calls.
444 * c-array-notation.c (fix_builtin_array_notation_fn,
445 build_array_notation_expr, fix_conditional_array_notations_1,
446 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
447
541e35a6
MP
4482014-11-28 Marek Polacek <polacek@redhat.com>
449
450 PR c/63862
451 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
452 convert the right operand to integer type.
453
b286be94
MP
4542014-11-25 Marek Polacek <polacek@redhat.com>
455
456 PR c/63877
457 * c-decl.c (start_function): Disable -Wmissing-declarations warning
458 for inline functions.
459
aa7da51a
JJ
4602014-11-21 Jakub Jelinek <jakub@redhat.com>
461
462 PR target/63764
463 * c-typeck.c (build_array_ref): Adjust
464 convert_vector_to_pointer_for_subscript caller. If it returns true,
465 call non_lvalue_loc on the result.
466
d876207f
RB
4672014-11-11 Richard Biener <rguenther@suse.de>
468
469 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
470 to true.
471
e5e44252
AK
4722014-11-10 Andi Kleen <ak@linux.intel.com>
473
474 PR c/60804
475 * c-parser.c (c_parser_statement_after_labels): Call
476 check_no_cilk.
477 (c_parser_if_statement): Dito.
478 (c_parser_switch_statement): Dito.
479 (c_parser_while_statement): Dito.
480 (c_parser_do_statement): Dito.
481 (c_parser_for_statement): Dito.
482 * c-typeck.c (c_finish_loop): Dito.
483
13c21655
PC
4842014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
485
486 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
487 OPT_Wshift_count_overflow in the warnings.
488
2d51fcef
MP
4892014-10-30 Marek Polacek <polacek@redhat.com>
490
491 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
492 print the stripped version as well, if they're not the same.
493
ef4bddc2
RS
4942014-10-29 Richard Sandiford <richard.sandiford@arm.com>
495
496 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
497 machine_mode.
498
c582198b
AM
4992014-10-28 Andrew MacLeod <amacleod@redhat.com>
500
501 * c-decl.c: Adjust include files.
502 * c-parser.c: Ditto.
503
ddc8de03
PM
5042014-10-27 Phil Muldoon <pmuldoon@redhat.com>
505 Tom Tromey <tromey@redhat.com>
506
507 * c-tree.h (enum c_oracle_request): New.
508 (c_binding_oracle_function): New typedef.
509 (c_binding_oracle, c_pushtag, c_bind): Declare.
510 * c-decl.c (c_binding_oracle): New global.
511 (I_SYMBOL_CHECKED): New macro.
512 (i_symbol_binding): New function.
513 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
514 (I_TAG_CHECKED): New macro.
515 (i_tag_binding): New function.
516 (I_TAG_BINDING, I_TAG_DECL): Redefine.
517 (I_LABEL_CHECKED): New macro.
518 (i_label_binding): New function.
519 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
520 (c_print_identifier): Save and restore c_binding_oracle.
521 (c_pushtag, c_bind): New functions.
522
60393bbc
AM
5232014-10-27 Andrew MacLeod <amacleod@redhat.com>
524
525 * c-typeck.c: Adjust include files.
526
d723bb7c
MLI
5272014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
528
529 PR c++/53061
530 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
531 initialization here...
532 (c_initialize_diagnostics): ... but here. Set defaults after
533 building pretty-printer.
534
1bc5a451
MP
5352014-10-23 Marek Polacek <polacek@redhat.com>
536
537 PR c/63626
538 * c-decl.c (pop_scope): Don't print warning in external_scope.
539
4435bb92
MP
5402014-10-19 Marek Polacek <polacek@redhat.com>
541
542 PR c/63567
543 * c-typeck.c (output_init_element): Allow initializing objects with
544 static storage duration with compound literals even in C99 and add
545 pedwarn for it.
546
7278465e
MP
5472014-10-17 Marek Polacek <polacek@redhat.com>
548
549 PR c/63567
550 * c-typeck.c (digest_init): Allow initializing objects with static
551 storage duration with compound literals even in C99 and add pedwarn
552 for it.
553
d9b7be2e
MP
5542014-10-17 Marek Polacek <polacek@redhat.com>
555
556 PR c/63543
557 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
558 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
559 error multiple times. Print the type.
560
f406ae1f
MP
5612014-10-17 Marek Polacek <polacek@redhat.com>
562
563 PR c/63549
564 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
565 type.
566
92574c7c
MP
5672014-10-17 Marek Polacek <polacek@redhat.com>
568
569 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
570 (start_function): Use OPT_Wimplicit_int instead of 0.
571 (store_parm_decls_oldstyle): Likewise.
572
1bc4a978
MT
5732014-10-17 Alan Modra <amodra@gmail.com>
574
575 PR middle-end/61848
576 * c-decl.c (merge_decls): Don't merge section name or tls model
577 to newdecl symtab node, instead merge to olddecl. Override
578 existing olddecl section name. Set tls_model for all thread-local
579 vars, not just OMP thread-private ones. Remove incorrect comment.
580
83685514
AM
5812014-10-16 Andrew MacLeod <amacleod@redhat.com>
582
583 * c-decl.c: Adjust include files.
584
78a7c317
DD
5852014-10-14 DJ Delorie <dj@redhat.com>
586
587 * c-parser.c (c_parse_init): Add RID entries for each __intN.
588 (c_token_starts_typename): Check all __intN, not just __int128.
589 (c_token_starts_declspecs): Likewise.
590 (c_parser_declspecs): Likewise.
591 (c_parser_attribute_any_word): Likewise.
592 (c_parser_objc_selector): Likewise.
593 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
594 (struct c_declspecs): Add int_n_idx field to record *which* __intN
595 is specified.
596 * c-decl.c (declspecs_add_type): Check for all __intN, not just
597 __int128.
598 (finish_declspecs): Likewise.
599
74d98c1e
AB
6002014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
601
602 * c-parser.c (c_parser_all_labels): New function to replace
603 the duplicate code.
604 (c_parser_statement): Call the new function.
605
84937de2
MP
6062014-10-09 Marek Polacek <polacek@redhat.com>
607
608 PR c/63480
609 * c-typeck.c (pop_init_level): Don't warn about initializing
610 with { }.
611
0382aaa0
MP
6122014-10-07 Marek Polacek <polacek@redhat.com>
613
614 PR c/59717
615 * c-decl.c (header_for_builtin_fn): New function.
616 (implicitly_declare): Suggest which header to include.
617
7a0ca710
MP
6182014-10-07 Marek Polacek <polacek@redhat.com>
619
620 * c-convert.c (convert): Use error_operand_p.
621 * c-typeck.c (require_complete_type): Likewise.
622 (really_atomic_lvalue): Likewise.
623 (digest_init): Likewise.
624 (handle_omp_array_sections_1): Likewise.
625
6bc8a126
MP
6262014-10-03 Marek Polacek <polacek@redhat.com>
627
628 PR c/63453
629 * c-decl.c (pop_scope): Don't warn about "inline function declared
630 but never defined" for functions marked with gnu_inline attribute.
631
d90c0a59
JJ
6322014-09-25 Jakub Jelinek <jakub@redhat.com>
633
634 PR c++/63249
635 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
636 on low_bound and length.
637
083e891e
MP
6382014-09-24 Marek Polacek <polacek@redhat.com>
639
640 PR c/61405
641 PR c/53874
642 * c-parser.c: Don't define CPP_KEYWORD.
643 (c_parser_switch_statement): Pass original type to c_finish_case.
644 * c-tree.h (c_finish_case): Update declaration.
645 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
646 conditionally to c_do_switch_warnings.
647
8d95fe25
MP
6482014-09-03 Marek Polacek <polacek@redhat.com>
649
650 PR c/62024
651 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
652 conversions.
653
9a771876
JJ
6542014-09-02 Jakub Jelinek <jakub@redhat.com>
655 Balaji V. Iyer <balaji.v.iyer@intel.com>
656 Igor Zamyatin <igor.zamyatin@intel.com>
657
658 * c-parser.c (c_parser_cilk_for): New function.
659 (c_parser_cilk_grainsize): Likewise.
660 (c_get_temp_regvar): Likewise.
661 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
662 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
663 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
664 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
665 case.
666
b7679d96
CG
6672014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
668
669 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
670 with using HOST_WIDE_INT without truncation to 'int'
671
59ea0364
MP
6722014-08-22 Marek Polacek <polacek@redhat.com>
673
674 PR c++/62199
675 * c-typeck.c (parser_build_binary_op): Adjust call to
676 warn_logical_not_parentheses.
677
671a475e
IZ
6782014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
679
680 PR other/62008
681 * c-parser.c (c_parser_array_notation): Check for correct
682 type of an array added.
683
04159acf
MP
6842014-08-19 Marek Polacek <polacek@redhat.com>
685
686 PR c++/62153
687 * c-typeck.c (build_binary_op): If either operand of a comparison
688 is a boolean expression, call maybe_warn_bool_compare.
689
c77935ee
PP
6902014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
691
692 PR c/45584
693 * c-typeck.c (build_c_cast): Do a conversion even when the
694 TYPE_MAIN_VARIANTs are the same.
695
35aff4fb
MP
6962014-08-19 Marek Polacek <polacek@redhat.com>
697
698 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
699 pedwarn_c99 instead of pedwarn.
700 (grokfield): Likewise.
701 (warn_defaults_to): New function.
702 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
703 Unconditionally call pedwarn_c99 instead of pedwarn.
704 (start_function): Call warn_defaults_to instead of pedwarn_c99.
705 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
706 check flag_isoc11 before.
707 * c-errors.c (pedwarn_c99): Change the return type to bool.
708 Handle -Wc99-c11-compat.
709 * c-parser.c (disable_extension_diagnostics): Handle
710 warn_c99_c11_compat.
711 (restore_extension_diagnostics): Likewise.
712 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
713 instead of pedwarn, don't check flag_isoc11 before.
714 (c_parser_declspecs): Likewise.
715 (c_parser_alignas_specifier): Likewise.
716 (c_parser_alignof_expression): Likewise.
717 (c_parser_generic_selection): Likewise.
718 * c-tree.h (pedwarn_c99): Update declaration.
719 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
720 of pedwarn_c99.
721
177cce46
MP
7222014-08-19 Marek Polacek <polacek@redhat.com>
723
724 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
725 to pedwarn_c90.
726 * c-errors.c: Include "opts.h".
727 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
728 * c-parser.c (disable_extension_diagnostics): Handle negative value
729 of warn_c90_c99_compat, too.
730 (restore_extension_diagnostics): Likewise.
731 (c_parser_compound_statement_nostart): Pass
732 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
733
6dc99c33
MP
7342014-08-12 Marek Polacek <polacek@redhat.com>
735
736 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
737 Add pedwarn.
738 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
739 Likewise.
740 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
741
f3bede71
MP
7422014-08-10 Marek Polacek <polacek@redhat.com>
743
744 PR c/51849
745 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
746 Call pedwarn_c90 instead of pedwarn.
747 (check_bitfield_type_and_width): Likewise.
748 (declspecs_add_qual): Likewise.
749 (declspecs_add_type): Likewise.
750 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
751 Adjust to only call pedwarn_c90.
752 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
753 pedwarn_c90 instead of pedwarn.
754 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
755 * c-parser.c (disable_extension_diagnostics): Handle
756 warn_c90_c99_compat.
757 (restore_extension_diagnostics): Likewise.
758 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
759 pedwarn_c90 instead of pedwarn.
760 (c_parser_initelt): Likewise.
761 (c_parser_postfix_expression): Likewise.
762 (c_parser_postfix_expression_after_paren_type): Likewise.
763 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
764 * c-tree.h: Fix formatting.
765 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
766 pedwarn_c90 instead of pedwarn.
767
9f25a338
TS
7682014-08-07 Trevor Saunders <tsaunders@mozilla.com>
769
770 * c-typeck.c: Remove include of pointer-set.h.
771
044331a8
MP
7722014-08-07 Marek Polacek <polacek@redhat.com>
773
774 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
775
b787e7a2
TS
7762014-08-02 Trevor Saunders <tsaunders@mozilla.com>
777
778 * c-typeck.c: Use hash_map instead of pointer_map.
779
6e2830c3
TS
7802014-08-02 Trevor Saunders <tsaunders@mozilla.com>
781
782 * c-decl.c: Use hash_set instead of pointer_set.
783
a7ee52fb
IZ
7842014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
785
786 PR middle-end/61455
787 * c-array-notation.c (expand_array_notations): Handling
788 of DECL_EXPR added.
789
b4dfdc11
MG
7902014-07-31 Marc Glisse <marc.glisse@inria.fr>
791
792 PR c++/60517
793 * c-typeck.c (c_finish_return): Return 0 instead of the address of
794 a local variable.
795
976d5a22
TT
7962014-07-30 Tom Tromey <tromey@redhat.com>
797
798 * c-typeck.c (struct constructor_stack) <designator_depth>: New
799 field.
800 (really_start_incremental_init, push_init_level): Initialize
801 designator_depth.
802 (pop_init_level): Set global designator_depth.
803 (process_init_element): Check for designated_init attribute.
804
30281de2
MP
8052014-07-20 Marek Polacek <polacek@redhat.com>
806
807 PR c/61852
808 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
809 (implicitly_declare): Pass location to implicit_decl_warning.
810
b108f48f
JJ
8112014-07-14 Jakub Jelinek <jakub@redhat.com>
812
813 PR middle-end/61294
814 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
815 If non-NULL, call c_parser_check_literal_zero.
816 (c_parser_check_literal_zero): New function.
817 (c_parser_postfix_expression_after_primary): Adjust
818 c_parser_expr_list caller, handle -Wmemset-transposed-args.
819
773ec47f
MP
8202014-07-06 Marek Polacek <polacek@redhat.com>
821
822 PR c/6940
823 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
824 * c-tree.h (C_ARRAY_PARAMETER): Define.
825 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
826 function parameter.
827
22e1cf1c
JH
8282014-07-02 Jan Hubicka <hubicka@ucw.cz>
829 Chen Gang <gang.chen.5i5j@gmail.com>
830
831 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
832 releasing symbol.
833
52ec0ea3
MP
8342014-07-01 Marek Polacek <polacek@redhat.com>
835
836 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
837 instead of 0 to WARN_FOR_ASSIGNMENT.
838
d5c3d343
MP
8392014-07-01 Marek Polacek <polacek@redhat.com>
840
841 PR c/58286
842 * c-typeck.c (convert_for_assignment): Pass
843 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
844
6a7253a4
MP
8452014-06-30 Marek Polacek <polacek@redhat.com>
846
847 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
848 has no_sanitize_undefined attribute.
849
5e88a8f4
IZ
8502014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
851
852 PR middle-end/57541
853 * c-array-notation.c (fix_builtin_array_notation_fn):
854 Check for 0 arguments in builtin call. Check that bultin argument is
855 correct.
856 * c-parser.c (c_parser_array_notation): Check for incorrect initial
857 index.
858
9698b078
SH
8592014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
860
861 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
862 qualifiers in __auto_type for atomic types.
863 (c_parser_typeof_specifier): Discard all type qualifiers in
864 __typeof__ for atomic types.
865
6e07c515
MP
8662014-06-25 Marek Polacek <polacek@redhat.com>
867
868 PR c/61162
869 * c-parser.c (c_parser_statement_after_labels): Pass the location of
870 the return expression to c_finish_return.
871
da6f124d
JJ
8722014-06-25 Jakub Jelinek <jakub@redhat.com>
873
874 * c-typeck.c (c_finish_omp_clauses): Make sure
875 OMP_CLAUSE_LINEAR_STEP has correct type.
876
c203e8a7
TS
8772014-06-24 Trevor Saunders <tsaunders@mozilla.com>
878
879 * c-decl.c: Adjust.
880
56ad0e38
JJ
8812014-06-24 Jakub Jelinek <jakub@redhat.com>
882
883 * c-parser.c (c_parser_omp_for_loop): For
884 #pragma omp parallel for simd move lastprivate clause from parallel
885 to for rather than simd.
886
47c2554f
MP
8872014-06-23 Marek Polacek <polacek@redhat.com>
888
889 * c-typeck.c (parser_build_binary_op): Don't call
890 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
891
56363ffd
JH
8922014-06-15 Jan Hubicka <hubicka@ucw.cz>
893
894 * c-parser.c (c_parser_omp_threadprivate): Likewise.
895 * c-decl.c (merge_decls): Likewise.
896
d7ff7ae5
MP
8972014-06-09 Marek Polacek <polacek@redhat.com>
898
899 PR c/36446
900 * c-typeck.c (error_init): Call inform instead of error_at.
901 (pedwarn_init): Call inform instead of pedwarn.
902 (warning_init): Call inform instead of warning_at.
903
24d047a3
JH
9042014-06-07 Jan Hubicka <hubicka@ucw.cz>
905
906 * c-decl.c (merge_decls): Use set_decl_section_name.
907 (duplicate_decls): Remove node if it exists.
908
9bac5cbb
G
9092014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
910
911 PR c/53119
912 * c-typeck.c (push_init_level, process_init_element,
913 pop_init_level): Correct check for zero initialization, move
914 missing brace warning to respect zero initialization.
915
8ffcdea8
MP
9162014-06-05 Marek Polacek <polacek@redhat.com>
917
918 PR c/56724
919 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
920
742938c9
MP
9212014-06-05 Marek Polacek <polacek@redhat.com>
922
923 PR c/49706
924 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
925 on the left hand side operand of a comparison.
926
6447c55d
MP
9272014-06-05 Marek Polacek <polacek@redhat.com>
928
929 PR c/48062
930 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
931 Print note only if the warning was printed.
932
9dc7743c
IZ
9332014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
934
935 PR c/58942
936 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
937 with a pointer.
938
fedfecef
MP
9392014-06-03 Marek Polacek <polacek@redhat.com>
940
941 PR c/60439
942 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
943 c_start_case.
944 * c-tree.h (c_start_case): Update.
945 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
946 switch condition has boolean value.
947
9b2b7279
AM
9482014-06-02 Andrew MacLeod <amacleod@redhat.com>
949
950 * c-decl.c: Include builtins.h.
951 * c-parser.c: Likewise.
952
5c1bc275
MP
9532014-05-27 Marek Polacek <polacek@redhat.com>
954
955 PR c/56724
956 * c-typeck.c (convert_arguments): Get location of a parameter. Change
957 error and warning calls to error_at and warning_at. Pass location of
958 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
959 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
960 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
961
97563bc8
IZ
9622014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
963
964 PR c/61191
965 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
966 function parameters.
967
aede2c10
JH
9682014-05-23 Jan Hubicka <hubicka@ucw.cz>
969
970 * c-decl.c (merge_decls): Preserve symtab node pointers.
971 (duplicate_decls): Free new decl.
972
edbba2ce
TS
9732014-05-23 Thomas Schwinge <thomas@codesourcery.com>
974
f3316c6d
TS
975 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
976 initialization.
977
edbba2ce
TS
978 * c-parser.c (c_parser_omp_target): Return bool values.
979
68c81f24
TS
9802014-05-22 Thomas Schwinge <thomas@codesourcery.com>
981
982 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
983 num_teams_loc variable to num_thread_limit_loc.
984
632f2871
RS
9852014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
986
987 * c-array-notation.c (expand_array_notations): Use void_node
988 instead of void_zero_node.
989
766090c2
TS
9902014-05-17 Trevor Saunders <tsaunders@mozilla.com>
991
992 * c-decl.c (finish_struct): Adjust.
993 (finish_enum): Likewise.
994 (bind): Adjust.
995 (record_inline_static): Likewise.
996 (push_scope): Likewise.
997 (make_label): Likewise.
998 (lookup_label_for_goto): Likewise.
999 (finish_struct): Likewise.
1000 (finish_enum): Likewise.
1001 (store_parm_decls): Likewise.
1002 (c_push_function_context): Likewise.
1003 * c-lang.h: Remove usage of variable_size gty attribute.
1004 * c-parser.c (c_parse_init): Adjust.
1005 (c_parse_file): Likewise.
1006
2b107f6b
MP
10072014-05-13 Marek Polacek <polacek@redhat.com>
1008
1009 PR c/61162
1010 * c-typeck.c (convert_for_assignment): Pass location to
1011 WARN_FOR_ASSIGNMENT instead of input_location.
1012
d033409e
MP
10132014-05-10 Marek Polacek <polacek@redhat.com>
1014
1015 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
1016 maybe_warn_string_init.
1017 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
1018 maybe_warn_string_init.
1019 * c-tree.h (maybe_warn_string_init): Update declaration.
1020 * c-typeck.c (maybe_warn_string_init): Add location parameter.
1021 Call pedwarn_init with loc instead of with input_location.
1022 (digest_init): Pass init_loc to maybe_warn_string_init.
1023 (pop_init_level): Call pedwarn_init with loc instead of with
1024 input_location.
1025 (set_init_index): Likewise.
1026 (process_init_element): Likewise.
1027
ea58ef42
MP
10282014-05-09 Marek Polacek <polacek@redhat.com>
1029
1030 PR c/61096
1031 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
1032 (c_parser_initelt): Pass location to set_init_label. Pass array index
1033 location to set_init_index.
1034 * c-tree.h (push_init_level): Update declaration.
1035 (pop_init_level): Likewise.
1036 (set_init_index): Likewise.
1037 (set_init_label): Likewise.
1038 * c-typeck.c (error_init): Add location parameter. Call error_at
1039 instead of error.
1040 (digest_init): Pass init_loc to error_init.
1041 (really_start_incremental_init):
1042 (push_init_level): Add location parameter. Pass loc to pop_init_level
1043 and error_init.
1044 (pop_init_level): Likewise.
1045 (set_designator): Add location parameter. Pass loc to pop_init_level,
1046 push_init_level, and error_init.
1047 (set_init_index): Add location parameter. Pass loc to error_init and
1048 set_designator.
1049 (set_init_label): Likewise.
1050 (output_init_element): Pass loc to error_init.
1051 (process_init_element): Pass loc to error_init, pop_init_level,
1052 pedwarn_init, and push_init_level.
1053
661a0813
MP
10542014-05-09 Marek Polacek <polacek@redhat.com>
1055
1056 PR c/50459
1057 * c-parser.c (c_parser_attributes): Parse the arguments as an
1058 expression-list if the attribute takes identifier.
1059
2793eeab
MP
10602014-05-08 Marek Polacek <polacek@redhat.com>
1061
1062 PR c/61053
1063 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
1064 TYPE_ALIGN_UNIT.
1065
f827930a
MP
10662014-05-08 Marek Polacek <polacek@redhat.com>
1067
1068 PR c/61077
1069 * c-decl.c (start_function): Warn for _Atomic-qualified return type
1070 of main.
1071
1d60af08
KZ
10722014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
1073 Mike Stump <mikestump@comcast.net>
1074 Richard Sandiford <rdsandiford@googlemail.com>
1075
1076 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
1077 (finish_enum): Use wide-int interfaces.
1078 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
1079 * c-typeck.c (build_c_cast): Likewise.
1080 (set_nonincremental_init_from_string): Likewise.
1081 (c_tree_equal): Likewise.
1082
a0e24419
MP
10832014-05-02 Marek Polacek <polacek@redhat.com>
1084
1085 PR c/25801
1086 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
1087 Return size_one_node when the type is not complete.
1088 (pointer_diff): Remove comment.
1089 (build_unary_op): Improve error messages.
1090
19fc9faa
MP
10912014-05-02 Marek Polacek <polacek@redhat.com>
1092
1093 * c-typeck.c (c_finish_return): Separate warning_at calls.
1094
63bc4e87
MP
10952014-05-02 Marek Polacek <polacek@redhat.com>
1096
1097 * c-tree.h (error_init): Remove declaration.
1098 (pedwarn_init): Likewise.
1099 * c-typeck.c (error_init): Make static and move above.
1100 (pedwarn_init): Likewise.
1101 (warning_init): Move above.
1102 (maybe_warn_string_init): Likewise.
1103
4bd2511b
JL
11042014-05-01 Jeff Law <law@redhat.com>
1105
1106 Revert:
1107
1108 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1109 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
1110 avoid goto.
1111
6a358dcb
MP
11122014-05-02 Marek Polacek <polacek@redhat.com>
1113
1114 PR c/60784
1115 * c-typeck.c (push_init_level): Set constructor_designated to
1116 p->designated for structures.
1117
ae5ebda4
MP
11182014-05-01 Marek Polacek <polacek@redhat.com>
1119
1120 PR c/60915
1121 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
1122 function-definition has an attribute after the declarator.
1123
96b40f8d
MP
11242014-05-01 Marek Polacek <polacek@redhat.com>
1125
1126 PR c/60257
1127 * c-typeck.c (warning_init): Add location_t parameter. Call
1128 warning_at instead of warning.
1129 (push_init_level): Pass input_location to warning_init.
1130 (add_pending_init): Add location_t parameter. Pass loc to
1131 warning_init.
1132 (set_nonincremental_init): Pass input_location to add_pending_init.
1133 (set_nonincremental_init_from_string): Likewise.
1134 (output_init_element): Pass loc to warning_init and to
1135 add_pending_init.
1136
32e00768
MP
11372014-05-01 Marek Polacek <polacek@redhat.com>
1138
1139 PR c/43395
1140 * c-typeck.c (c_finish_return): Distinguish between label and variable
1141 when warning about returning local address.
1142
c9379ce2
MP
11432014-05-01 Marek Polacek <polacek@redhat.com>
1144
1145 PR c/29467
1146 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
1147 in C89 mode.
1148
d00887e8
MP
11492014-05-01 Marek Polacek <polacek@redhat.com>
1150
1151 PR c/43245
1152 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
1153 instead of 0 to WARN_FOR_QUALIFIERS.
1154
5436fa2e
MP
11552014-05-01 Marek Polacek <polacek@redhat.com>
1156
1157 PR c/56989
1158 * c-typeck.c (default_conversion): Use better location for
1159 error call.
1160
f8ed5150
MP
11612014-04-30 Marek Polacek <polacek@redhat.com>
1162
1163 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
1164 also when SANITIZE_FLOAT_DIVIDE is on.
1165
8337d1db
MP
11662014-04-30 Marek Polacek <polacek@redhat.com>
1167
1168 PR c/60139
1169 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
1170 and pedwarn_init. Use loc insted of input_location.
1171
c4bdc42f
MP
11722014-04-30 Marek Polacek <polacek@redhat.com>
1173
1174 PR c/60351
1175 * c-typeck.c (build_binary_op): Use location when warning about
1176 shift count.
1177
45484dcf
MP
11782014-04-25 Marek Polacek <polacek@redhat.com>
1179
1180 PR c/18079
1181 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
1182 always_inline/noinline and hot/cold attributes.
1183
34cf811f
MP
11842014-04-25 Marek Polacek <polacek@redhat.com>
1185
1186 PR c/60114
1187 * c-parser.c (c_parser_initelt): Pass input_location to
1188 process_init_element.
1189 (c_parser_initval): Pass loc to process_init_element.
1190 * c-tree.h (process_init_element): Adjust declaration.
1191 * c-typeck.c (push_init_level): Pass input_location to
1192 process_init_element.
1193 (pop_init_level): Likewise.
1194 (set_designator): Likewise.
1195 (output_init_element): Add location_t parameter. Pass loc to
1196 digest_init.
1197 (output_pending_init_elements): Pass input_location to
1198 output_init_element.
1199 (process_init_element): Add location_t parameter. Pass loc to
1200 output_init_element.
1201
42056eac
JJ
12022014-04-24 Jakub Jelinek <jakub@redhat.com>
1203
1204 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
1205 atomic-clause, allow comma in between atomic-clause and
1206 seq_cst.
1207
e162a134
JJ
12082014-04-22 Jakub Jelinek <jakub@redhat.com>
1209
1210 PR c/59073
1211 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
1212 fails, don't set OM_PARALLEL_COMBINED and return NULL.
1213
2f6babac
IZ
12142014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
1215
1216 PR middle-end/60469
1217 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1218 create_tmp_var instead build_decl for creating temps.
1219 (build_array_notation_expr): Likewise.
1220 (fix_conditional_array_notations_1): Likewise.
1221 (fix_array_notation_expr): Likewise.
1222 (fix_array_notation_call_expr): Likewise.
1223
8edbfaa6
JJ
12242014-03-28 Jakub Jelinek <jakub@redhat.com>
1225
1226 PR c++/60689
1227 * c-tree.h (c_build_function_call_vec): New prototype.
1228 * c-typeck.c (build_function_call_vec): Don't call
1229 resolve_overloaded_builtin here.
1230 (c_build_function_call_vec): New wrapper function around
1231 build_function_call_vec. Call resolve_overloaded_builtin here.
1232 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
1233 Call c_build_function_call_vec instead of build_function_call_vec.
1234 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1235 * c-decl.c (finish_decl): Likewise.
1236
7485aeea
MLI
12372014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1238
1239 PR c/55383
1240 * c-typeck.c: Use correct format string in cast-qual warning
1241
b17a8b07
TS
12422014-03-07 Thomas Schwinge <thomas@codesourcery.com>
1243
1244 * c-decl.c (c_decl_attributes): Use
1245 lang_hooks.types.omp_mappable_type.
1246 * c-typeck.c (c_finish_omp_clauses): Likewise.
1247
3af9c5e9
MP
12482014-03-06 Marek Polacek <polacek@redhat.com>
1249
1250 PR c/60197
1251 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
1252 of checking tree code.
1253
1c9f5f33
PK
12542014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1255
1256 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
1257 (c_parser_parameter_declaration): Likewise.
1258
cc28fc7f
MP
12592014-02-19 Marek Polacek <polacek@redhat.com>
1260
1261 PR c/60195
1262 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
1263 Call mark_exp_read on exp.value.
1264 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
1265 TREE_ADDRESSABLE on old instead of val.
1266 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
1267
b581c05c
PK
12682014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1269
1270 * c-parser.c (c_parser_get_builtin_args): Replace calls to
1271 C_EXPR_APPEND by vec_safe_push.
1272 * c-tree.h (C_EXPR_APPEND): Remove.
1273
81e5eca8
MP
12742014-01-31 Marek Polacek <polacek@redhat.com>
1275
1276 PR c/59963
1277 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
1278 build_function_call_vec.
1279 (build_function_call): Likewise.
1280 (build_atomic_assign): Likewise.
1281 (build_function_call_vec): Add arg_loc parameter. Use it.
1282 (convert_arguments): Likewise.
1283 (convert_for_assignment): Rename rhs_loc to expr_loc.
1284 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
1285 (c_parser_objc_keywordexpr): Likewise.
1286 (c_parser_postfix_expression_after_primary): Call
1287 build_function_call_vec with expr_loc rather than op_loc.
1288 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
1289 build_function_call_vec.
1290 (c_parser_expr_list): Add locations parameter. Fill it with locations
1291 of function arguments.
1292 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
1293
68fca595
MP
12942014-01-30 Marek Polacek <polacek@redhat.com>
1295
1296 PR c/59940
1297 * c-typeck.c (build_function_call_vec): Use loc parameter.
1298 (convert_arguments): Add location parameter. Use it.
1299 (ep_convert_and_check): Likewise.
1300 (build_atomic_assign): Adjust convert_for_assignment call.
1301 (build_modify_expr): Likewise.
1302 (digest_init): Likewise.
1303 (c_finish_return): Likewise.
1304 (build_conditional_expr): Adjust ep_convert_and_check calls.
1305 (convert_for_assignment): Add rhs_loc parameter. Use it.
1306 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
1307 calls.
1308
fa337f3a
RB
13092014-01-30 Richard Biener <rguenther@suse.de>
1310
1311 PR c/59905
1312 * c-typeck.c (build_function_call_vec): Do not replace calls
1313 to a function via an incompatible type with a runtime abort.
1314
b72271b9
BI
13152014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
1316
1317 * c-parser.c (c_parser_declaration_or_fndef): Replaced
1318 flag_enable_cilkplus with flag_cilkplus.
1319 (c_parser_direct_declarator_inner): Likewise.
1320 (c_parser_attribute_any_word): Likewise.
1321 (c_parser_attributes): Likewise.
1322 (c_parser_compound_statement): Likewise.
1323 (c_parser_statement_after_labels): Likewise.
1324 (c_parser_if_statement): Likewise.
1325 (c_parser_switch_statement): Likewise.
1326 (c_parser_do_statement): Likewise.
1327 (c_parser_for_statement): Likewise.
1328 (c_parser_unary_expression): Likewise.
1329 (c_parser_postfix_expression): Likewise.
1330 (c_parser_postfix_expression_after_primary): Likewise.
1331 (c_parser_postfix_expression_after_primary): Likewise.
1332 (c_parser_omp_clause_name): Likewise.
1333 (c_finish_omp_declare_simd): Likewise.
1334 (c_parser_cilk_verify_simd): Likewise.
1335 * c-typeck.c (build_array_ref): Likewise.
1336 (build_function_call_vec): Likewise.
1337 (convert_arguments): Likewise.
1338 (build_compound_expr): Likewise.
1339 (c_finish_return): Likewise.
1340 (c_finish_if_stmt): Likewise.
1341 (c_finish_loop): Likewise.
1342 (build_binary_op): Likewise.
1343
393e8e8b
MP
13442014-01-23 Marek Polacek <polacek@redhat.com>
1345
1346 PR c/59846
1347 * c-typeck.c (parser_build_binary_op): Use location instead of
1348 input_location.
1349 (build_binary_op): Pass location to shorten_compare.
1350
f04dda30
MP
13512014-01-23 Marek Polacek <polacek@redhat.com>
1352
1353 PR c/58346
1354 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
1355 an empty aggregate.
1356
789eadcd
MP
13572014-01-23 Marek Polacek <polacek@redhat.com>
1358
1359 PR c/59871
1360 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
1361 of a comma expression.
1362 (emit_side_effect_warnings): Likewise.
1363
40f14e9f
BI
13642014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1365
1366 PR c/59825
1367 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
1368 function to use walk_tree and moved a lot of its functionality to
1369 expand_array_notations.
1370 (expand_array_notations): New function.
1371
74558dd9
BI
13722014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1373
1374 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
1375 attribute an attribute without value.
1376
652fea39
JJ
13772014-01-23 Jakub Jelinek <jakub@redhat.com>
1378
1379 PR middle-end/58809
1380 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
1381 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
1382
f34f1c87
MP
13832014-01-22 Marek Polacek <polacek@redhat.com>
1384
1385 PR c/59891
1386 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
1387 of remove_c_maybe_const_expr on op1 and op2.
1388
241f845a
JJ
13892014-01-15 Jakub Jelinek <jakub@redhat.com>
1390
1391 PR c/58943
1392 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
1393 effects, preevaluate rhs using SAVE_EXPR first.
1394
9a74f20c
BI
13952014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
1396
1397 PR c++/59631
1398 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
1399 statements with if-elseif statements.
1400
96066ce1
MP
14012014-01-06 Marek Polacek <polacek@redhat.com>
1402
1403 PR c/57773
1404 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
1405 defined bit-field types only in ISO C.
1406
23a5b65a
RS
14072014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1408
1409 Update copyright years
1410
f9030485
RS
14112014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1412
1413 * c-array-notation.c: Use the standard form for the copyright notice.
1414
41958c28
BI
14152013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
1416
1417 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
1418 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
1419 field in parser is not empty. If not-empty, call the function
1420 c_parser_finish_omp_declare_simd.
1421 (c_parser_cilk_clause_vectorlength): Modified function to be shared
1422 between SIMD-enabled functions and #pragma simd. Added new parameter.
1423 (c_parser_cilk_all_clauses): Modified the usage of the function
1424 c_parser_cilk_clause_vectorlength as mentioned above.
1425 (c_parser_cilk_simd_fn_vector_attrs): New function.
1426 (c_finish_cilk_simd_fn_tokens): Likewise.
1427 (is_cilkplus_vector_p): Likewise.
1428 (c_parser_omp_clause_name): Added checking for "vectorlength,"
1429 "nomask," and "mask" strings in clause name.
1430 (c_parser_omp_all_clauses): Added 3 new case statements:
1431 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
1432 PRAGMA_CILK_CLAUSE_NOMASK.
1433 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
1434 check for vector attribute and if so call the function
1435 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
1436 called the function c_finish_cilk_simd_fn_tokens.
1437 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
1438 parser field is non-empty. If so, parse them as you would parse
1439 the omp declare simd pragma.
1440 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
1441 Added a check when step is a parameter and flag it as error.
1442 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
1443 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
1444 pragma_omp_clause.
1445
cef0fd0e
TS
14462013-12-17 Thomas Schwinge <thomas@codesourcery.com>
1447
1448 * c-parser.c (c_parser_omp_parallel): Fix description.
1449
12893402
BI
14502013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
1451
1452 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
1453 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1454 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
1455 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
1456
296674db
JM
14572013-12-04 Joseph Myers <joseph@codesourcery.com>
1458
1459 PR c/52023
1460 * c-parser.c (c_parser_alignas_specifier): Use
1461 c_sizeof_or_alignof_type instead of c_alignof.
1462 (c_parser_alignof_expression): Likewise, with min_alignof
1463 parameter depending on alignof spelling used.
1464
edd28054
MP
14652013-12-04 Marek Polacek <polacek@redhat.com>
1466
1467 PR c/54113
1468 * c-decl.c (start_function): Don't warn for missing prototype for
1469 inline functions.
1470
da0fc454
MP
14712013-12-03 Marek Polacek <polacek@redhat.com>
1472
1473 PR c/59351
1474 * c-decl.c (build_compound_literal): Allow compound literals with
1475 empty initial value.
1476
4c2ecab0
JM
14772013-12-02 Joseph Myers <joseph@codesourcery.com>
1478
1479 PR c/58235
1480 * c-typeck.c (build_modify_expr): Diagnose assignment to
1481 expression with array type.
1482
340baef7
JM
14832013-11-29 Joseph Myers <joseph@codesourcery.com>
1484
1485 PR c/42262
1486 * c-typeck.c (process_init_element): Do not treat a string as
1487 initializing a whole array when used with a designator for an
1488 individual element.
1489
6763b9f7
JM
14902013-11-29 Joseph Myers <joseph@codesourcery.com>
1491
1492 PR c/57574
1493 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
1494 an inline function following a static declaration.
1495
e7bd1de1
JJ
14962013-11-28 Jakub Jelinek <jakub@redhat.com>
1497
1498 PR c/59310
1499 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
1500 to p_name before calling c_parser_omp_teams instead of after.
1501 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
1502 argument. Remove unused p_name variable.
1503
0136f8f0
AH
15042013-11-27 Aldy Hernandez <aldyh@redhat.com>
1505 Jakub Jelinek <jakub@redhat.com>
1506
1507 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
1508 external_scope is NULL.
1509
241b71bb
TV
15102013-11-27 Tom de Vries <tom@codesourcery.com>
1511 Marc Glisse <marc.glisse@inria.fr>
1512
1513 PR c++/59032
1514 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
1515
2fb9a547
AM
15162013-11-22 Andrew MacLeod <amacleod@redhat.com>
1517
1518 * c-typeck.c: Add required include files from gimple.h.
1519
8400e75e
DM
15202013-11-22 David Malcolm <dmalcolm@redhat.com>
1521
1522 * c-decl.c (define_label, shadow_tag_warned)
1523 (check_bitfield_type_and_width, grokdeclarator, grokparms,
1524 store_parm_decls_newstyle, store_parm_decls_oldstyle)
1525 (declspecs_add_type): Remove use of in_system_header macro.
1526 * c-parser.c (c_parser_unary_expression): Likewise.
1527 * c-typeck.c (store_init_value, process_init_element)
1528 (c_start_case): Likewise.
1529
1530 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
1531 macro.
1532
1533 * c-parser.c (c_parser_set_source_position_from_token): Remove
1534 reference to in_system_header from comment.
1535
386b1f1f
RS
15362013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1537
1538 * c-decl.c (grokdeclarator): Update comment to refer to
1539 tree_to_[su]hwi rather than tree_low_cst.
1540
ae7e9ddd
RS
15412013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1542
1543 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
1544 tree_to_uhwi throughout.
1545
9439e9a1
RS
15462013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1547
1548 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
1549 throughout.
1550
9541ffee
RS
15512013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1552
1553 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
1554 throughout.
1555
c02065fc
AH
15562013-11-15 Aldy Hernandez <aldyh@redhat.com>
1557
1558 * c-parser.c (c_parser_cilk_simd): New.
1559 (c_parser_cilk_verify_simd): New.
1560 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
1561 (c_parser_omp_for_loop): Add case for NE_EXPR.
1562 Set c_break_label for CILK_SIMD.
1563 (c_parser_cilk_clause_vectorlength): New.
1564 (c_parser_cilk_clause_linear): New.
1565 (c_parser_cilk_clause_name): New.
1566 (c_parser_cilk_all_clauses): New.
1567 * c-typeck.c (build_unary_op): Pass location argument to
1568 readonly_error.
1569 (build_modify_expr): Same.
1570 (build_asm_expr): Same.
1571 (c_finish_bc_stmt): Error on break/continue in loops.
1572
18f429e2
AM
15732013-11-14 Andrew MacLeod <amacleod@redhat.com>
1574
1575 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
1576
d8a2d370
DN
15772013-11-14 Diego Novillo <dnovillo@google.com>
1578
1579 * c-decl.c: Include print-tree.h.
1580 Include stor-layout.h.
1581 Include varasm.h.
1582 Include attribs.h.
1583 Include stringpool.h.
1584 * c-lang.c: Include fold-const.h.
1585 * c-parser.c: Include stringpool.h.
1586 Include attribs.h.
1587 Include stor-layout.h.
1588 Include varasm.h.
1589 Include trans-mem.h.
1590 * c-typeck.c: Include stor-layout.h.
1591 Include trans-mem.h.
1592 Include varasm.h.
1593 Include stmt.h.
1594
38b7bc7f
JM
15952013-11-13 Joseph Myers <joseph@codesourcery.com>
1596
1597 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
1598 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
1599 __auto_type.
1600 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
1601 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
1602 RID_AUTO_TYPE.
1603 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
1604 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
1605 (c_parser_declarator, c_parser_direct_declarator_inner)
1606 (c_parser_parameter_declaration, c_parser_type_name): All callers
1607 changed.
1608 (c_parser_declaration_or_fndef): Handle declarations with type
1609 determined from the initializer.
1610
45b0be94
AM
16112013-11-12 Andrew MacLeod <amacleod@redhat.com>
1612
18f429e2 1613 * c-typeck.c: Include gimplify.h.
45b0be94 1614
582d9b50
JM
16152013-11-12 Joseph Myers <joseph@codesourcery.com>
1616
1617 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
1618 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
1619 comment.
1620 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
1621 or _Thread_local as appropriate in diagnostics.
1622 (build_null_declspecs): Initialize ret->thread_gnu_p.
1623 (declspecs_add_scspec): Handle either __thread or _Thread_local
1624 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
1625 pedantic. Do not disallow _Thread_local extern and _Thread_local
1626 static.
1627
267bac10
JM
16282013-11-07 Joseph Myers <joseph@codesourcery.com>
1629 Andrew MacLeod <amacleod@redhat.com>
1630
1631 * c-aux-info.c (gen_type): Handle atomic qualifier.
1632 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
1633 qualifiers when compating types.
1634 (shadow_tag_warned): Handle atomic_p in declspecs.
1635 (quals_from_declspecs): Likewise.
1636 (start_decl): Use c_type_promotes_to when promoting argument
1637 types.
1638 (grokdeclarator): Handle _Atomic.
1639 (get_parm_info): Diagnose any qualifier on "void" as only
1640 parameter.
1641 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
1642 comparing types. Use c_type_promotes_to when promoting argument
1643 types.
1644 (finish_function): Use c_type_promotes_to when promoting argument
1645 types.
1646 (build_null_declspecs): Handle atomic_p in declspecs.
1647 (declspecs_add_qual): Handle RID_ATOMIC.
1648 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
1649 (c_token_starts_declspecs): Handle RID_ATOMIC.
1650 (c_parser_declspecs): Handle atomic type specifiers and
1651 qualifiers.
1652 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
1653 from types of expressions with atomic type.
1654 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
1655 (c_parser_attribute_any_word): Handle RID_ATOMIC.
1656 (c_parser_initializer, c_parser_initelt, c_parser_initval)
1657 (c_parser_statement_after_labels, c_parser_switch_statement)
1658 (c_parser_for_statement, c_parser_expr_no_commas)
1659 (c_parser_conditional_expression, c_parser_binary_expression)
1660 (c_parser_cast_expression, c_parser_unary_expression)
1661 (c_parser_postfix_expression)
1662 (c_parser_postfix_expression_after_primary, c_parser_expression):
1663 Use convert_lvalue_to_rvalue.
1664 (c_parser_expression_conv, c_parser_expr_list): Document
1665 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
1666 (c_parser_objc_synchronized_statement): Use
1667 convert_lvalue_to_rvalue.
1668 (c_parser_objc_selector): Handle RID_ATOMIC.
1669 (c_parser_objc_receiver, c_parser_array_notation): Use
1670 convert_lvalue_to_rvalue.
1671 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
1672 _Atomic (type-name).
1673 (struct c_declspecs): Add atomic_p field.
1674 (convert_lvalue_to_rvalue): Declare.
1675 * c-typeck.c (c_type_promotes_to): Promote atomic types to
1676 corresponding atomic types.
1677 (qualify_type): Don't add _Atomic qualifiers from second argument.
1678 (comp_target_types): Do not allow _Atomic mismatches.
1679 (type_lists_compatible_p): Do not remove atomic qualifiers when
1680 comparing types.
1681 (really_atomic_lvalue, convert_lvalue_to_rvalue)
1682 (build_atomic_assign): New functions.
1683 (build_unary_op): Use build_atomic_assign for atomic increment and
1684 decrement.
1685 (build_conditional_expr): Do not treat _Atomic void as a qualified
1686 version of void.
1687 (build_modify_expr): Use build_atomic_assign for atomic LHS.
1688 (find_anonymous_field_with_type, convert_to_anonymous_field)
1689 (convert_for_assignment): Do not remove atomic qualifiers when
1690 comparing types.
1691 (digest_init): Do not accept initialization of arrays of atomic
1692 elements by string constants.
1693 (build_asm_expr): Use convert_lvalue_to_rvalue.
1694 (build_binary_op): Do not treat _Atomic void as a qualified
1695 version of void.
1696
0c249d4b
DD
16972013-11-06 DJ Delorie <dj@redhat.com>
1698
1699 * c-decl.c (locate_old_decl): If a previous conflicting decl is
1700 both explicit and builtin, print the location of the explicit one.
1701
6d7f7e0a
TB
17022013-11-05 Tobias Burnus <burnus@net-b.de>
1703
1704 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
1705 c_parser_omp_distribute, c_parser_omp_teams,
1706 c_parser_omp_target, c_parser_omp_declare): Handle
1707 -fopenmp-simd.
1708
b906f4ca
MP
17092013-11-03 Marek Polacek <polacek@redhat.com>
1710
1711 * c-decl.c (grokdeclarator): Add VLA instrumentation.
1712
ee1d5a02
JJ
17132013-11-01 Jakub Jelinek <jakub@redhat.com>
1714
1715 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
1716 check_dup_generic at the end, unless remove is true.
1717 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
1718 remove = true;.
1719 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
1720
5a9785fb
JJ
17212013-10-31 Jakub Jelinek <jakub@redhat.com>
1722
1723 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
1724 with decl that is not pointer nor array.
1725
939b37da
BI
17262013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
1727
1728 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
1729 a spawning function is found.
1730 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
1731 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
1732 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1733 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
1734 case.
1735 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
1736 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
1737 expr.
1738 (c_finish_return): Added a check to reject _Cilk_spawn in return
1739 expression.
1740 (build_cilk_spawn): New function.
1741 (build_cilk_sync): Likewise.
1742 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
1743
d4af74d4
TB
17442013-10-27 Tobias Burnus <burnus@net-b.de>
1745
1746 PR other/33426
1747 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
1748 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
1749 (c_parser_statement_after_labels): Update calls.
1750
d73749df 17512013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
1752
1753 PR other/33426
1754 * c-parser.c (c_parser_pragma, c_parser_for_statement):
1755 Handle PRAGMA_IVDEP.
1756 (c_parser_statement_after_labels): Update call.
1757
f28aa681
MP
17582013-10-24 Marek Polacek <polacek@redhat.com>
1759
1760 * c-parser.c (c_parser_struct_declaration): Add a comment.
1761 (c_parser_declarator): Don't allow _Alignas here.
1762
0645c1a2
AM
17632013-10-17 Andrew MacLeod <amacleod@redhat.com>
1764
1765 * c-parser.c: Include omp-low.h.
1766 * c-typeck.c: Likewise.
1767
568a31f2
MP
17682013-10-17 Marek Polacek <polacek@redhat.com>
1769
1770 PR c/58267
1771 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
1772 Document syntax of the array-declarator.
1773 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
1774 are not permitted.
1775 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
1776 (c_parser_struct_declaration): Likewise.
1777 (c_parser_declarator): Likewise.
1778 (c_parser_direct_declarator_inner): Likewise.
1779 (c_parser_parameter_declaration): Likewise.
1780 (c_parser_type_name): Likewise.
1781
acf0174b
JJ
17822013-10-11 Jakub Jelinek <jakub@redhat.com>
1783
1784 * c-lang.h (current_omp_declare_target_attribute): New extern
1785 decl.
1786 * c-parser.c: Include c-lang.h.
1787 (struct c_parser): Change tokens to c_token *.
1788 Add tokens_buf field. Change tokens_avail type to unsigned int.
1789 (c_parser_consume_token): If parser->tokens isn't
1790 &parser->tokens_buf[0], increment parser->tokens.
1791 (c_parser_consume_pragma): Likewise.
1792 (enum pragma_context): Add pragma_struct and pragma_param.
1793 (c_parser_external_declaration): Adjust
1794 c_parser_declaration_or_fndef caller.
1795 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
1796 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
1797 Adjust recursive call.
1798 (c_parser_struct_or_union_specifier): Use pragma_struct instead
1799 of pragma_external.
1800 (c_parser_parameter_declaration): Use pragma_param instead of
1801 pragma_external.
1802 (c_parser_compound_statement_nostart, c_parser_label,
1803 c_parser_for_statement): Adjust
1804 c_parser_declaration_or_fndef callers.
1805 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
1806 it through to c_parser_conditional_expression.
1807 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
1808 pass it through to c_parser_binary_expression. Adjust recursive
1809 call.
1810 (c_parser_binary_expression): Remove prec argument, add
1811 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
1812 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
1813 binop matches it, use build2 instead of parser_build_binary_op.
1814 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
1815 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
1816 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
1817 Handle pragma_struct and pragma_param the same as pragma_external.
1818 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
1819 (c_parser_omp_variable_list): Parse array sections for
1820 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
1821 (c_parser_omp_clause_collapse): Fully fold collapse expression.
1822 (c_parser_omp_clause_reduction): Handle user defined reductions.
1823 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
1824 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
1825 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
1826 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
1827 c_parser_omp_clause_depend, c_parser_omp_clause_map,
1828 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
1829 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
1830 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
1831 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
1832 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
1833 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
1834 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
1835 (c_parser_omp_for_loop): Add CODE argument, pass it through
1836 to c_finish_omp_for. Change last argument to cclauses,
1837 and adjust uses to grab parallel clauses from the array of all
1838 the split clauses. Adjust c_parser_binary_expression,
1839 c_parser_declaration_or_fndef and c_finish_omp_for callers.
1840 (omp_split_clauses): New function.
1841 (c_parser_omp_simd): New function.
1842 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
1843 Allow the function to be called also when parsing combined constructs,
1844 and call c_parser_omp_simd when parsing for simd.
1845 (c_parser_omp_sections_scope): If section-sequence doesn't start with
1846 #pragma omp section, require exactly one structured-block instead of
1847 sequence of statements.
1848 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
1849 Allow the function to be called also when parsing combined constructs.
1850 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
1851 Allow the function to be called also when parsing combined
1852 constructs.
1853 (c_parser_omp_taskgroup, c_parser_omp_cancel,
1854 c_parser_omp_cancellation_point, c_parser_omp_distribute,
1855 c_parser_omp_teams, c_parser_omp_target_data,
1856 c_parser_omp_target_update, c_parser_omp_target,
1857 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
1858 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
1859 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
1860 (c_parser_omp_construct): Add p_name and mask vars. Handle
1861 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
1862 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
1863 and c_parser_omp_sections callers.
1864 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
1865 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1866 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
1867 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
1868 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
1869 OMP_CLAUSE_DEPEND.
1870 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
1871 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
1872 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
1873 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
1874 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
1875 * c-typeck.c: Include tree-inline.h.
1876 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
1877 handle_omp_array_sections_1, handle_omp_array_sections,
1878 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
1879 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
1880 user defined reductions.
1881 (c_tree_equal): New function.
1882 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
1883 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
1884 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
1885 c_check_omp_declare_reduction_r): New prototypes.
1886 * c-decl.c (current_omp_declare_target_attribute): New variable.
1887 (c_decl_attributes): New function.
1888 (start_decl, start_function): Use it instead of decl_attributes.
1889 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
1890 c_omp_reduction_decl, c_omp_reduction_lookup,
1891 c_check_omp_declare_reduction_r): New functions.
1892
0a6c2227
TT
18932013-09-25 Tom Tromey <tromey@redhat.com>
1894
1895 * Make-lang.in (c/gccspec.o): Remove.
1896 (CFLAGS-c/gccspec.o): New variable.
1897 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
1898 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
1899 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
1900
f3bc55f0
TT
19012013-09-25 Tom Tromey <tromey@redhat.com>
1902
1903 * Make-lang.in (c/gccspec.o): Don't use subshell.
1904
a24d975c
MP
19052013-09-18 Marek Polacek <polacek@redhat.com>
1906
1907 PR sanitize/58443
1908 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
1909 Remove unnecessary check.
1910
ce6923c5
MP
19112013-09-18 Marek Polacek <polacek@redhat.com>
1912
1913 PR sanitizer/58411
1914 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
1915 no_sanitize_undefined attribute.
1916
a1e51df9
KT
19172013-09-13 Kai Tietz <ktietz@redhat.com>
1918
1919 PR target/57848
1920 * c-decl.c (c_builtin_function_ext_scope): Remove
1921 wrong assumption that it is never called on prexisting
1922 symbol.
1923
0af94e6f
JR
19242013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
1925
1926 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
1927
20059c8b
GDR
19282013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1929
1930 * c-objc-common.c (c_tree_printer): Tidy.
1931
de5a5fa1
MP
19322013-08-30 Marek Polacek <polacek@redhat.com>
1933
1934 * c-typeck.c (build_binary_op): Add division by zero and shift
1935 instrumentation.
1936
2531a1d9 19372013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 1938 Joseph Myers <joseph@codesourcery.com>
2531a1d9 1939
6e2bcc98 1940 PR c/35649
2531a1d9
JR
1941 * c-typeck.c (c_common_type): Prefer double_type_node over
1942 other REAL_TYPE types with the same precision.
1943 (convert_arguments): Likewise.
1944
025311c4
GDR
19452013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
1946
1947 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
1948 (c_initialize_diagnostics): Call a destructor for the early printer.
1949
da6ca2b5
GDR
19502013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1951
1952 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
1953 printer initialization.
1954
318cda85 19552013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 1956
318cda85
BI
1957 PR c/57490
1958 * c-array-notation.c (fix_conditional_array_notations_1): Added a
1959 check for truth values.
1960 (expand_array_notation_exprs): Added truth values case. Removed an
1961 unwanted else. Added for-loop to walk through subtrees in default
1962 case.
1963
b066401f
GDR
19642013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
1965
1966 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
1967
fb48aadc
JM
19682013-07-23 Joseph Myers <joseph@codesourcery.com>
1969
1970 * c-parser.c (struct c_generic_association): Fix typo.
1971
433cc7b0
TT
19722013-07-23 Tom Tromey <tromey@redhat.com>
1973 Joseph Myers <joseph@codesourcery.com>
1974
1975 * c-parser.c (struct c_generic_association): New.
1976 (c_generic_association_d): New typedef.
1977 (c_parser_generic_selection): New function.
1978 (c_parser_postfix_expression): Handle RID_GENERIC.
1979
26d40c3d
JM
19802013-07-13 Jason Merrill <jason@redhat.com>
1981
1982 PR c++/57793
1983 * c-decl.c (finish_struct): Check for too-large class.
1984
ecdbd01a 19852013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
1986
1987 PR c/57821
1988 * c-typeck.c (set_init_index): When folding, check for index overflow.
1989
1141ed3f
BI
19902013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
1991
1992 * c-parser.c (c_parser_array_notation): Removed rejection of array
1993 notations in an array of function pointers.
1994
713b46fa
BI
19952013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
1996
1997 * c-array-notation.c (make_triplet_val_inv): New function.
1998 (create_cmp_incr): Likewise.
1999 (create_array_refs): Likewise.
2000 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
2001 Also modularized common parts between functions and called the function.
2002 (build_array_notation_expr): Likewise.
2003 (fix_conditional_array_notations_1): Likewise.
2004 (fix_array_notation_expr): Likewise.
2005 (fix_array_notation_call_expr): Likewise.
2006
92f20202
MP
20072013-06-18 Marek Polacek <polacek@redhat.com>
2008
2009 PR c/57630
2010 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
2011
73a23b06
BI
20122013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
2013
2014 * c-array-notation.c (build_array_notation_expr): Reject array notation
2015 mismatch between LHS and RHS even inside a call_expr. Also, removed
2016 a couple while statements that were dead code.
2017
00b8517d
BI
20182013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
2019
2020 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
2021 excessive precision expressions in function parameters. Also removed
2022 couple unwanted while statements.
2023
1509bdda
BI
20242013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
2025
2026 * c-array-notation.c (expand_array_notation_exprs): Added
2027 ARRAY_NOTATION_REF case.
2028
d60f1706
BI
20292013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
2030
2031 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
2032 function to c-family/array-notation-common.c.
2033 (is_cilkplus_reduce_builtin): Likewise.
2034 (find_rank): Likewise.
2035 (extract_array_notation_exprs): Likewise.
2036 (replace_array_notations): Likewise.
2037 (find_inv_trees): Likewise.
2038 (replace_inv_trees): Likewise.
2039 (contains_array_notation_expr): Likewise.
2040 (find_correct_array_notation_type): Likewise.
2041 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
2042 (struct inv_list): Moved this to c-family/array-notation-common.c.
2043 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
2044
6d6efbb3
BI
20452013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
2046
2047 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
2048 reduction functions outside the for-loop. Added a check if the fundecl
2049 is non-NULL. Finally, removed an unwanted if-statement, and made the
2050 body unconditional.
2051
25c22937
BI
20522013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2053
2054 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
2055 condition of the if-statement matches the rank of else-block and then-
2056 block when array notations are used.
2057 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
2058 expression after the entire function body is parsed.
2059 (c_parser_expr_no_commas): Delayed creating array notation expressions
2060 to the end of function parsing.
2061 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
2062 whole if-statement instead of just the condition.
2063 (expand_array_notation_exprs): Added MODIFY_EXPR case.
2064
edd25645
BI
20652013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2066
2067 PR c/57474
2068 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
2069 array to NULL_TREE if they are unused. Also added a check for the
2070 field to be NULL before its fields are used in future.
2071
065ce7f1
RO
20722013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2073
2074 PR bootstrap/57450
2075 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
2076 (build_array_notation_expr): Likewise.
2077
36536d79
BI
20782013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2079
2080 * c-typeck.c (build_array_ref): Added a check to see if array's
2081 index is greater than one. If true, then emit an error.
2082 (build_function_call_vec): Exclude error reporting and checking
2083 for builtin array-notation functions.
2084 (convert_arguments): Likewise.
2085 (c_finish_return): Added a check for array notations as a return
2086 expression. If true, then emit an error.
2087 (c_finish_loop): Added a check for array notations in a loop
2088 condition. If true then emit an error.
2089 (lvalue_p): Added a ARRAY_NOTATION_REF case.
2090 (build_binary_op): Added a check for array notation expr inside
2091 op1 and op0. If present, we call another function to find correct
2092 type.
2093 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
2094 * c-parser.c (c_parser_compound_statement): Check if array
2095 notation code is used in tree, if so, then transform them into
2096 appropriate C code.
2097 (c_parser_expr_no_commas): Check if array notation is used in LHS
2098 or RHS, if so, then build array notation expression instead of
2099 regular modify.
2100 (c_parser_postfix_expression_after_primary): Added a check for
2101 colon(s) after square braces, if so then handle it like an array
2102 notation. Also, break up array notations in unary op if found.
2103 (c_parser_direct_declarator_inner): Added a check for array
2104 notation.
2105 (c_parser_compound_statement): Added a check for array notation in
2106 a stmt. If one is present, then expand array notation expr.
2107 (c_parser_if_statement): Likewise.
2108 (c_parser_switch_statement): Added a check for array notations in
2109 a switch statement's condition. If true, then output an error.
2110 (c_parser_while_statement): Similarly, but for a while.
2111 (c_parser_do_statement): Similarly, but for a do-while.
2112 (c_parser_for_statement): Similarly, but for a for-loop.
2113 (c_parser_unary_expression): Check if array notation is used in a
2114 pre-increment or pre-decrement expression. If true, then expand
2115 them.
2116 (c_parser_array_notation): New function.
2117 * c-array-notation.c: New file.
2118 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
2119
cd192ccc
MS
21202013-05-23 Mike Stump <mikestump@comcast.net>
2121
2122 * c-typeck.c (convert_for_assignment): Handle references to memory
2123 spaces better.
2124
427b248d
JM
21252013-05-16 Jason Merrill <jason@redhat.com>
2126
2127 * Make-lang.in (cc1$(exeext)): Use link mutex.
2128
44d90fe1
PC
21292013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
2130
2131 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
2132 to simply use OPT_Wpointer_arith.
2133 (build_unary_op): Likewise.
2134
4e7d7b3d
JJ
21352013-04-03 Jakub Jelinek <jakub@redhat.com>
2136
2137 PR c/19449
2138 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
2139 argument. If set, or it temporarily for parsing of the first
2140 argument into force_folding_builtin_constant_p.
2141 (c_parser_postfix_expression): Adjust callers.
2142
839b422f
RB
21432013-03-21 Richard Biener <rguenther@suse.de>
2144
2145 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
2146 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
2147
2ee028f1
MP
21482013-02-12 Marek Polacek <polacek@redhat.com>
2149
2150 PR c/44938
2151 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
2152 origtypes to NULL.
2153
8824edff
JJ
21542013-01-24 Jakub Jelinek <jakub@redhat.com>
2155
2156 PR c/56078
2157 * c-typeck.c (set_nonincremental_init_from_string): If
2158 constructor_max_index is NULL, treat it as if tree_int_cst_lt
2159 returned false.
2160 (process_init_element): Likewise.
2161
eadd3d0d
JJ
21622012-12-20 Jakub Jelinek <jakub@redhat.com>
2163
2164 PR c++/55619
2165 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
2166 argument, don't call default_function_array_conversion
2167 nor c_fully_fold here.
2168 (c_parser_asm_statement): Adjust callers.
2169 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
2170 and outputs here, and call default_function_array_conversion
2171 on inputs that don't need to be addressable.
2172
f8a93a2e
JJ
21732012-12-18 Jakub Jelinek <jakub@redhat.com>
2174
2175 PR c/39464
2176 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
2177 warning require that both c_common_unsigned_type as well as
2178 c_common_signed_type is the same for both mvl and mvr types.
2179
9771b263
DN
21802012-11-16 Diego Novillo <dnovillo@google.com>
2181
2182 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
2183
2184 * c-common.c: Use new vec API in vec.h.
2185 * c-common.h: Likewise.
2186 * c-gimplify.c: Likewise.
2187 * c-pragma.c: Likewise.
2188 * c-pretty-print.c: Likewise.
2189 * c-pretty-print.h: Likewise.
2190 * c-semantics.c: Likewise.
2191 * c-decl.c: Likewise.
2192 * c-parser.c: Likewise.
2193 * c-tree.h: Likewise.
2194 * c-typeck.c: Likewise.
2195
880661a4
JW
21962012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
2197
2198 PR c++/54930
2199 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
2200
077d1abe
MLI
22012012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2202
2203 PR c/53066
2204 * c-decl.c (warn_if_shadowing): Do not warn if a variable
2205 shadows a function, unless the variable is a function or a
2206 pointer-to-function.
2207
3a785c97
JJ
22082012-10-12 Jakub Jelinek <jakub@redhat.com>
2209
2210 PR c/54381
2211 * c-parser.c (struct c_tree_loc_pair): Removed.
2212 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
2213 add location_t * and tree * arguments, fill in array of 3
2214 sizeof_arg trees and corresponding locs.
2215 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
2216 c_parser_expr_list callers.
2217 (c_parser_postfix_expression_after_primary): Likewise. Pass
2218 array of 3 sizeof_arg trees and locs (corresponding to first
2219 3 arguments) to sizeof_pointer_memaccess_warning.
2220
703c8606
LC
22212012-10-09 Lawrence Crowl <crowl@google.com>
2222
2223 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
2224 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
2225 hash table.
2226
5d9de0d0
PC
22272012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
2228
2229 PR c++/54194
2230 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
2231 call.
2232
a212e43f
MG
22332012-10-09 Marc Glisse <marc.glisse@inria.fr>
2234
2235 PR c++/54427
2236 * c-typeck.c: Include c-common.h.
2237 (enum stv_conv): Moved to c-common.h.
2238 (scalar_to_vector): Moved to c-common.c.
2239 (build_binary_op): Adapt to scalar_to_vector's new prototype.
2240 * Make-lang.in: c-typeck.c depends on c-common.h.
2241
3b78de56
AC
22422012-10-04 Arnaud Charlet <charlet@adacore.com>
2243
2244 * c-decl.c (c_write_global_declarations): Fix handling of
2245 -fdump-ada-spec*.
2246
78c60e3d
SS
22472012-09-30 Sharad Singhai <singhai@google.com>
2248
2249 * c-decl.c (c_write_global_declarations): Use a different method
2250 to determine if the dump has ben initialized.
2251
9f33203d
JM
22522012-09-14 Joseph Myers <joseph@codesourcery.com>
2253
2254 PR c/54552
2255 * c-typeck.c (c_cast_expr): When casting to a type requiring
2256 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
2257 c_fully_fold first.
2258
a27d595d
JM
22592012-09-14 Joseph Myers <joseph@codesourcery.com>
2260
2261 PR c/54103
2262 * c-typeck.c (build_unary_op): Pass original argument of
2263 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
2264 any C_MAYBE_CONST_EXPR, if it has integer operands.
2265 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
2266 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
2267 to c_objc_common_truthvalue_conversion, then remove any
2268 C_MAYBE_CONST_EXPR, if they have integer operands. Use
2269 c_objc_common_truthvalue_conversion not
2270 c_common_truthvalue_conversion.
2271 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
2272 call note_integer_operands for arguments with integer operands
2273 that are not integer constants.
2274
9feb29df
JJ
22752012-09-13 Jakub Jelinek <jakub@redhat.com>
2276
2277 PR c/54559
2278 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
2279 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
2280
d409320c
JJ
22812012-08-31 Jakub Jelinek <jakub@redhat.com>
2282
2283 PR c/54428
2284 * c-convert.c (convert): Don't call fold_convert_loc if
2285 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
2286 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
2287 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
2288
6265d07c
JJ
22892012-08-24 Jakub Jelinek <jakub@redhat.com>
2290
2291 PR c/54355
2292 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
2293 for nested and empty_ok arguments in the call to
2294 c_parser_declaration_or_fndef.
2295
1a4049e7
JJ
22962012-08-17 Jakub Jelinek <jakub@redhat.com>
2297
2298 * c-tree.h (c_last_sizeof_arg): Declare.
2299 * c-parser.c (struct c_tree_loc_pair): New type.
2300 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
2301 non-NULL.
2302 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
2303 (c_parser_postfix_expression_after_primary): Likewise. Call
2304 sizeof_pointer_memaccess_warning if needed.
2305 (sizeof_ptr_memacc_comptypes): New function.
2306 * c-typeck.c (c_last_sizeof_arg): New global variable.
2307 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
2308
0229aee9
UB
23092012-07-24 Uros Bizjak <ubizjak@gmail.com>
2310
2311 * c-lang.h (lang_decl): Add variable_size GTY option.
2312
7ee2468b
SB
23132012-07-16 Steven Bosscher <steven@gcc.gnu.org>
2314
2315 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
2316 * Make-lang.in: Fix dependencies.
2317
d4a10d0a
SB
23182012-06-29 Steven Bosscher <steven@gcc.gnu.org>
2319
2320 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
2321 and add language Makefile hooks.
2322 * config-lang.in: New file.
2323 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
2324 add the required "normal" config-lang.in rules.
2325 * c-lang.h: Moved from gcc/ to here.
2326 * c-tree.h: Likewise.
2327 * c-objc-common.c: Likewise.
2328 * c-objc-common.h: Likewise.
2329 * c-typeck.c: Likewise.
2330 * c-convert.c: Likewise.
2331 * c-lang.c: Likewise.
2332 * c-aux-info.c: Likewise.
2333 * c-errors.c: Likewise.
2334 * gccspec.c: Likewise.
2335 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
2336 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
2337\f
5624e564 2338Copyright (C) 2012-2015 Free Software Foundation, Inc.
d4a10d0a
SB
2339
2340Copying and distribution of this file, with or without modification,
2341are permitted in any medium without royalty provided the copyright
2342notice and this notice are preserved.